age = 3
if age >= 18:
    print('your age is', age)
elif age >= 6:
    print('your age is2', age)
else:
    print('your age is3', age)


print("--------------循环控制------------------------")
names = ['Michael', 'Bob', 'Tracy']
for name in names:
    print(name)

sum = 0
# range(101)生成的是0-100的整数序列，不是到101。
for x in range(101):
    sum = sum+x
print(sum)

print("-----------------字典的循环---------------")
dict = {'a': 1, 'b': 2, 'c': 3}
for key in dict:
    print(key, dict[key])

print("-----------------while循环---------------")
sum = 0
n = 0
while n < 104:
    sum = sum+n
    n = n+1
print(sum)